package cn.jichangxiu.ucenter.service.impl;

import cn.jichangxiu.common.ucenter.entity.Authority;
import cn.jichangxiu.ucenter.mapper.AuthorityMapper;
import cn.jichangxiu.ucenter.service.inte.AuthorityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class AuthorityServiceImpl implements AuthorityService {

    @Autowired
    private AuthorityMapper authorityMapper;

    @Override
    public List<Authority> getAuthByRoleId(String roleId) {
        List<Authority> auths = new ArrayList<>();
        try {
            auths = authorityMapper.findAuthoritiesByRoleId(roleId);
        }catch (Exception e){

        }
        return auths;
    }

}
